using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace comm.objst
{
    //#region TableFaction
    [Serializable]
    public class TableFaction : ICodeReplace
    {
#region 2013-1-4 19:16:52
public const string KEY_FAC_ID="FacId";
public const string STAR_ID="StarId";
public const string NAME="Name";
public const string FLAG_IMAGE_BYTES="FlagImageBytes";
public const string LORD_PLAYER_ID="LordPlayerId";
public const string LORD_SUPPORT_COUNT="LordSupportCount";
public const string LORD_OPPOSE_COUNT="LordOpposeCount";
public const string BEGIN_LORD_VOTE="BeginLordVote";
public const string VOTE_BEGIN_TIME="VoteBeginTime";
public const string VOTE_END_TIME="VoteEndTime";
public const string HSY_LORD_COUNT="HsyLordCount";
public const string HERO_COUNT="HeroCount";
public const string LAND_COUNT="LandCount";
public const string VICTORY_RECORD="VictoryRecord";
public const string DEFEAT_RECORD="DefeatRecord";
public const string CREATE_TIME="CreateTime";

#endregion
public comm.CodeFill FillRegion()
        {
            return new CodeFill(CodeFillType.ORM_CONST, this);
        }

        private string _facId = null;
        [OrmAttr(true)]
        public string FacId
        {
            get
            {
                if (_facId == null)
                {
                    _facId = "";
                }
                return _facId;
            }
            set { _facId = value; }
        }

        private string _starId = null;
        public string StarId
        {
            get
            {
                if (_starId == null)
                {
                    _starId = "";
                }
                return _starId;
            }
            set { _starId = value; }
        }

        private string _name = null;
        public string Name
        {
            get
            {
                if (_name == null)
                {
                    _name = "";
                }
                return _name;
            }
            set { _name = value; }
        }

        public byte[] FlagImageBytes { get; set; }

        private string _lordPlayerId = null;
        public string LordPlayerId
        {
            get
            {
                if (_lordPlayerId == null)
                {
                    _lordPlayerId = "";
                }
                return _lordPlayerId;
            }
            set { _lordPlayerId = value; }
        }

        public int LordSupportCount { get; set; }
        public int LordOpposeCount { get; set; }

        public bool BeginLordVote { get; set; }

        private DateTime _voteBeginTime = DateTime.Now;
        public DateTime VoteBeginTime
        {
            get { return _voteBeginTime; }
            set { _voteBeginTime = value; }
        }

        private DateTime _voteEndTime = DateTime.Now;
        public DateTime VoteEndTime
        {
            get { return _voteEndTime; }
            set { _voteEndTime = value; }
        }

        public int HsyLordCount { get; set; }
        public int HeroCount { get; set; }
        public int LandCount { get; set; }
        public int VictoryRecord { get; set; }
        public int DefeatRecord { get; set; }

        private DateTime _createTime = DateTime.Now;
        public DateTime CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }
    }
    //#endregion

    //#region TableThaneVote
    [Serializable]
    public class TableLordVote : TablePlayerFaction, ICodeReplace
    {
#region 2013-1-4 19:16:52
public const string KEY_VOTE_ID="VoteId";
public const string BIG_TEXT_SLOGAN="Slogan";
public const string SUPPORT_COUNT="SupportCount";
public const string OPPOSE_COUNT="OpposeCount";
public const string PLAYER_ID="PlayerId";
public const string FAC_ID="FacId";

#endregion
public comm.CodeFill FillRegion()
        {
            return new CodeFill(CodeFillType.ORM_CONST, this);
        }

        private string _voteId = null;
        [OrmAttr(true)]
        public string VoteId
        {
            get
            {
                if (_voteId == null)
                {
                    _voteId = comm.GUID.NewString();
                }
                return _voteId;
            }
            set { _voteId = value; }
        }

        private string _slogan = null;
        [OrmAttr(false, true)]
        public string Slogan
        {
            get
            {
                if (_slogan == null)
                {
                    _slogan = "";
                }
                return _slogan;
            }
            set { _slogan = value; }
        }

        public int SupportCount { get; set; }
        public int OpposeCount { get; set; }
    }
    //#endregion
}
